<!-- 
 - Copyright 2012 OmniFaces.
 -
 - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 - the License. You may obtain a copy of the License at
 -
 -     http://www.apache.org/licenses/LICENSE-2.0
 -
 - Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 - an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 - specific language governing permissions and limitations under the License.
 -->
<ui:component
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:cc="http://java.sun.com/jsf/composite"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
>
	<cc:interface>
		<cc:attribute name="header" required="true" />
		<cc:attribute name="docs" required="true" />
		<cc:attribute name="url" required="true" />
		<cc:attribute name="label" required="true" />
	</cc:interface>
	<cc:implementation>
		<c:set var="docs" value="#{page.current.documentation[cc.attrs.docs]}" />
		<ui:fragment rendered="#{not empty docs}">
			<h3>#{cc.attrs.header}</h3>
			<ul>
				<ui:repeat value="#{docs}" var="path">
					<li><a href="#{cc.attrs.url}"><code>#{cc.attrs.label}</code></a></li>
				</ui:repeat>
			</ul>
		</ui:fragment>
	</cc:implementation>
</ui:component>